//
// Created by blank on 2017/5/8.
// Copyright (c) 2017 CYN. All rights reserved.
//

#import "DataAccessFactory.h"
#import "PrintDataAccessObject.h"


@implementation DataAccessFactory {

}
+ (DataAccessFactory *)instance {
    static DataAccessFactory *_instance = nil;

    @synchronized (self) {
        if (_instance == nil) {
            _instance = [[self alloc] init];
        }
    }

    return _instance;
}

- (instancetype)init {
    self = [super init];
    if (self) {
        [self printDAO];
    }

    return self;
}

- (PrintDataAccessObject *)printDAO {
    if (!_printDAO) {
        _printDAO = [[PrintDataAccessObject alloc] init];
    }
    return _printDAO;
}


@end